@import '~@/scss/GlobalVariables';

%open {
  background-color: $background-color-1;
  border: 1px solid $mew-green;
}

.wrap {
  margin: 0;
  padding: 0;
  position: relative;

  .standard-dropdown {
    background-color: $white;
    position: relative;
    //position: absolute;
    width: 100%;
    z-index: 2;

    &.open {
      @extend %open;

      min-height: 200px;
      position: relative;
      border-radius: 4px;
      border-top: 0;
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }

    .item-container {
      max-height: 200px;
      overflow-y: scroll;
    }

    .item {
      border-bottom: 1px solid $light-grey-6;
      cursor: pointer;
      padding: 10px 15px;

      p {
        display: flex;
        align-items: center;

        i {
          width: 40px;
        }
      }

      &:last-child {
        border-bottom: 0;
      }

      &:hover {
        background-color: $light-grey-3;
      }

      &.selected {
        background-color: $light-grey-3;
      }
    }
  }
}

.dropdown-search-container {
  background-color: $background-color-1;
  padding: 0 10px 8px;
  position: relative;

  input {
    background-color: $white;
    border: 0;
    height: 30px;
    padding-left: 25px;
    width: 100%;
  }

  i {
    color: $light-grey-6;
    left: 15px;
    position: absolute;
    top: 8px;
  }

  &.open {
    border-bottom: 1px solid $mew-green;
  }
}

.dropdown-item-container {
  background-color: $white;
  position: absolute;
  width: 100%;
  z-index: 2;

  &.open {
    @extend %open;

    border-radius: 4px;
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .item-container {
    max-height: 200px;
    overflow-y: scroll;
  }

  .item {
    border-bottom: 1px solid $light-grey-6;
    cursor: pointer;
    padding: 10px 15px;

    p {
      display: flex;
      align-items: center;

      i {
        width: 40px;
      }
    }

    &:last-child {
      border-bottom: 0;
    }

    &:hover {
      background-color: $light-grey-3;
    }

    &.selected {
      background-color: $light-grey-3;
    }
  }
}

.placeholder {
  color: $light-grey-6;
}
// *********************************************************************
// .dropdown-button
// *********************************************************************
.dropdown-button {
  padding: 17px 20px;
  border: 1px solid $light-grey-1;
  background-color: $light-grey-1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  position: relative;
  display: flex;
  align-items: center;

  p {
    font-size: 14px;
  }

  i {
    margin-left: auto;
  }
}

.dropdown-list {
  position: absolute;
  //top: 63px;
  left: 0;
  z-index: 1;
  border-radius: 4px;
  width: 100%;
  background-color: $light-grey-1;
  ul {
    max-height: 150px;
    overflow: auto;
    li {
      padding: 10px 20px;
      cursor: pointer;
      border-bottom: 1px solid $light-grey-6;

      &:nth-child(odd) {
        background-color: $light-grey-2;
      }

      &:hover {
        background-color: $light-grey-7;
      }
    }
  }
}
